#define _CRT_SECURE_NO_WARNINGS
#include <stdio.h>

int main() {
    int a;
    int count = 0;
    while (scanf("%d", &a) != EOF)
    {

        while (a != 1)
        {
            if (a % 2 == 0)
            {
                a /= 2;
            }
            else {
                a = a * 3 + 1;
            }
            count++;
        }
        printf("%d", count);
    }
    return 0;
}